import request from '@/utils/request'

export function searchProperty(userId, searchObj, pageNum, pageSize) {
  return request({
    url: '/property/myReport/myPropertySearch',
    method: 'post',
    data: searchObj,
    params: { userId, pageNum, pageSize }
  })
}
export function searchAllProperty(searchObj, pageNum, pageSize) {
  return request({
    url: '/property/propertyCommon/searchAllProperty',
    method: 'post',
    data: searchObj,
    params: { pageNum, pageSize }
  })
}
export function searchArchivesProperty(searchObj, pageNum, pageSize) {
  return request({
    url: '/property/archives/searchArchivesProperty',
    method: 'post',
    data: searchObj,
    params: { pageNum, pageSize }
  })
}
export function searchAuditProperty(searchObj, userId, pageNum, pageSize) {
  return request({
    url: '/property/audit/searchAuditProperty',
    method: 'post',
    data: searchObj,
    params: { userId, pageNum, pageSize }
  })
}
export function searchAlreadyProperty(searchObj, userId, pageNum, pageSize) {
  return request({
    url: '/property/audit/searchAlreadyProperty',
    method: 'post',
    data: searchObj,
    params: { userId, pageNum, pageSize }
  })
}
export function searchEnquiryProperty(searchObj, pageNum, pageSize) {
  return request({
    url: '/property/enquiry/searchEnquiryProperty',
    method: 'post',
    data: searchObj,
    params: { pageNum, pageSize }
  })
}
export function searchFinanceProperty(searchObj, pageNum, pageSize) {
  return request({
    url: '/property/finance/searchFinanceProperty',
    method: 'post',
    data: searchObj,
    params: { pageNum, pageSize }
  })
}
export function searchStatisticsProperty(searchObj, pageNum, pageSize) {
  return request({
    url: '/property/statistics/searchStatisticsProperty',
    method: 'post',
    data: searchObj,
    params: { pageNum, pageSize }
  })
}
export function addInitProperty(property) {
  return request({
    url: '/property/addInit/addInitProperty',
    method: 'post',
    data: property
  })
}
export function getPropertyInfo(id) {
  return request({
    url: '/property/common/getProperty/' + id,
    method: 'get'
  })
}
export function getPropertyStatus(id) {
  return request({
    url: '/property/common/getStatus/' + id,
    method: 'get'
  })
}
export function updateProperty(property) {
  return request({
    url: '/property/common/updateProperty/',
    method: 'post',
    data: property
  })
}
export function updatePropertyLeaf(reportLeaf, statusNum) {
  return request({
    url: '/property/common/updatePropertyLeaf/' + statusNum,
    method: 'put',
    data: reportLeaf
  })
}
export function submitAudit(reportId, userId) {
  return request({
    url: '/property/common/submitAudit',
    method: 'get',
    params: { reportId, userId }
  })
}
export function stampAudit(reportId, userId) {
  return request({
    url: '/property/common/stampAudit',
    method: 'get',
    params: { reportId, userId }
  })
}
export function auditToFile(reportId, userId) {
  return request({
    url: '/property/common/file',
    method: 'get',
    params: { reportId, userId }
  })
}
export function auditPassProperty(reportId, userId) {
  return request({
    url: '/property/common/auditPassProperty',
    method: 'get',
    params: { reportId, userId }
  })
}
export function auditTerminationProperty(reportId, userId) {
  return request({
    url: '/property/common/auditTerminationProperty',
    method: 'get',
    params: { reportId, userId }
  })
}
export function backReportLeaf(reportLeaf) {
  return request({
    url: '/property/common/backReportLeaf/',
    method: 'post',
    data: reportLeaf
  })
}
export function auditPropertyList(id, pageNum, pageSize) {
  return request({
    url: '/property/audit/auditPropertyList/' + id,
    method: 'get',
    params: { pageNum, pageSize }
  })
}
export function downloadFinance(searchObj) {
  return request({
    url: '/property/statistics/download',
    method: 'post',
    data: searchObj,
    responseType: 'blob'
  })
}
export function getSearchFormList() {
  return request({
    url: '/property/myReport/getSearchForm',
    method: 'get'
  })
}
